package com.project.service;


import com.project.server.Request;
import com.project.server.Response;
import com.project.server.Servlet;

public class LoginService implements Servlet {

    public void service(Request request, Response response){

        String userName = request.getParameter("userName");
        String pwd = request.getParameter("pwd");

        if ("java".equals(userName) && "123".equals(pwd)){
            response.sendMessage("登陆成功！<a href='findAll'>");
        }
        else {
            response.sendMessage("登录失败。<a href='login.html'>请重新登录</a>");
        }

    }
}
